package com.zyj.retry;

import com.zyj.retry.dto.Cat;
import com.zyj.retry.service.CatService;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.retry.annotation.EnableRetry;

@EnableRetry
@SpringBootApplication
public class App2 {

    public static void main(String[] args) {
        ConfigurableApplicationContext context = SpringApplication.run(App2.class, args);
        CatService catService = context.getBean(CatService.class);
        System.out.println("----------------");

        Cat cat = catService.getCat("憨憨");
        System.out.println(cat);
    }
}
